package com.itcat.service.impl;/*
 * @Author: gonhsl
 * @Date:2022-04-02-21:09
 * */

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.itcat.api.mysql.SmsHomeBrandApi;
import com.itcat.mysql.pojo.SmsHomeBrand;
import com.itcat.service.SmsHomeBrandService;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class SmsHomeBrandServiceImpl implements SmsHomeBrandService {
    @DubboReference
    private SmsHomeBrandApi smsHomeBrandApi;
    @Override
    public Page<SmsHomeBrand> list(Integer pageNum, Integer pageSize, String brandName, Integer recommendStatus) {
        Page<SmsHomeBrand> brandPage = smsHomeBrandApi.list(pageNum, pageSize, brandName, recommendStatus);
        return brandPage;
    }

    @Override
    public void create(List<SmsHomeBrand> homeBrand) {
        smsHomeBrandApi.create(homeBrand);
    }

    @Override
    public void delete(List<Integer> ids) {
        smsHomeBrandApi.delete(ids);
    }

    @Override
    public void updateRecommendStatus(List<Integer> ids, Integer recommendStatus) {
        smsHomeBrandApi.updateRecommendStatus(ids,recommendStatus);
    }

    @Override
    public void updateSort(Integer id, Integer sort) {
        smsHomeBrandApi.updateSort(id,sort);
    }
}
